package com.dimples.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 角色菜单关联
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/6/29
 */
@ApiModel(value = "com-dimples-system-entity-RoleMenu")
@Data
@TableName(value = "t_role_menu")
public class SysRoleMenu {
    /**
     * 角色ID
     */
    @TableId(value = "ROLE_ID", type = IdType.INPUT)
    @ApiModelProperty(value = "角色ID")
    @NotNull(message = "不能为空")
    private Long roleId;

    /**
     * 菜单/按钮ID
     */
    @TableField(value = "MENU_ID")
    @ApiModelProperty(value = "菜单/按钮ID")
    private Long menuId;

    @TableField(exist = false)
    @ApiModelProperty(value = "菜单/按钮ID")
    @NotNull(message = "不能为空")
    private Long[] menuIds;
}